function y = tax_T2(x,x2)
%x = endowment
%x2 = interest income
%TAX returns the amount of income taxes for an ordinary income x and
%interst income x2
%for T2 only
xnew=x+x2;
y=zeros(size(xnew));
y(xnew>21)=0.1*(xnew(xnew>21)-21);
y(xnew>39)=0.15*(xnew(xnew>39)-39)+1.8;
y(xnew>96)=0.25*(xnew(xnew>96)-96)+10.35;

end

